from flask import Flask, request
from functools import wraps

app = Flask(__name__)


def login_verify(func):
    @wraps(func)
    def wrapper(*args, **kwargs):
        user_name = request.args.get('user')
        password = request.args.get('password')
        if user_name == 'mark' and password == 123:
            return func(*args, **kwargs)
        else:
            return '请登录'

    return wrapper


@app.route('/')
def hello_world():
    return 'Hello World!'


@app.route('/my_info/')
@login_verify
def my_info():
    return '个人信息页面'


if __name__ == '__main__':
    app.run()